
@extends('admin.readLayout')
@section('title','活动详情')
@section('content')
    <blockquote class="layui-elem-quote">活动详情</blockquote>

        <div class="layui-colla-content layui-show">
            <p><img src="{{asset('storage/'.$model->thumb)}}"/></p>
            <p>活动名称：{{$model->title}}
            <p>活动时间：{{$model->start_time}}~{{$model->end_time}}</p>
            <blockquote class="layui-elem-quote">所含套餐</blockquote>
            <hr/>
            @foreach($model->combo as $k=>$v)
                <p>套餐名称：{{$v->title}}</p>
                <p>返利方式：{{\App\Http\Controllers\Admin\Business\Service\ComboActivities::getRateTypeList()[$model->rate_type]}}</p>
                <p>返利比率：
                    @if($model->rate_type==$rate_type_user)
                        上级：{{$model->rate_type}}%
                        顶级：{{$model->top_rate}}%
                    @else
                        @if($v->rate_type==$rate_type_user)
                            上级：{{$v->rate_type}}%
                            顶级：{{$v->top_rate}}%
                        @else
                            上级：{{$sysRate['rate']}}%
                            顶级：{{$sysRate['top_rate']}}%
                        @endif
                    @endif
                </p>
                <hr/>

            @endforeach

            <p>活动方式：{{\App\Http\Controllers\Admin\Business\Service\ComboActivities::getTypeList()[$model->type]}}</p>
            <p>@if($model->type==$reduce_type)减免数额：￥{{$model->reduce}}@else折扣：{{$model->rebate}}%@endif</p>
            <p>详情：</p>
            <pre>{!! $model->content !!}</pre>
        </div>
@endsection
@section('script')
    <script>
        //注意：折叠面板 依赖 element 模块，否则无法进行功能性操作
        layui.use('element', function(){
            var element = layui.element;

            //…
        });
    </script>
@endsection